package com.haoze.nurse.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

import java.sql.Timestamp;
import java.util.List;
import java.util.Objects;

@ApiModel(value = "医嘱基本信息实体类")
public class OrderInfoByInpatNoVo {

    @ApiModelProperty(name = "组医嘱编号")
    private String orderNo;

    @ApiModelProperty(name = "医嘱编号")
    private String inpatorderdataId;

    @ApiModelProperty(name = "住院号")
    private String inpatNum;

    @ApiModelProperty(name = "频次")
    private String freqName;

    @ApiModelProperty(name = "医嘱用法")
    private String administration;

    @ApiModelProperty(name = "医嘱类型")
    private String type;

    @ApiModelProperty(name = "病人姓名")
    private String patName;

    @ApiModelProperty(name = "医嘱状态,长期医嘱，临时医嘱")
    private String orderStatus;
    @ApiModelProperty(name = "医嘱状态 1.临时，2长期")
    private Integer orderStatusValue;

    @ApiModelProperty(name = "医嘱创建时间")
    private String gmtCreate;

    @ApiModelProperty(name = "医嘱执行状态")
    private String status;
    @ApiModelProperty(name = "医嘱执行状态Id")
    private Integer statusId;

    @Deprecated
    @ApiModelProperty(name = "医嘱执行状态")
    private String tmpStatus;

    /**
     * 执行时间
     */
    private String execDatetime;

    @ApiModelProperty(name = "药品名称")
    private String ordersItem;

    @ApiModelProperty(name = "单次剂量")
    private Double itemDosage;

    @ApiModelProperty(name = "单位")
    private String unitName;

    @ApiModelProperty(name = "嘱托")
    private String ordersRemark;

    @ApiModelProperty(name = "计划开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Timestamp planBeginDatetime;

    @ApiModelProperty(name = "计划结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Timestamp planEndDatetime;

    @ApiModelProperty(name = "医嘱停止时间")
    private String stopDatetime;

    @ApiModelProperty(name = "医嘱停止执行人")
    private String stopUserName;

    @ApiModelProperty(name = "医嘱执行人")
    private String execUserName;

    @ApiModelProperty(name = "医嘱开立人")
    private String createUserName;

    @ApiModelProperty(name = "对应子医嘱")
    private List<OrderInfoByInpatNoVo> orderInfoByInpatNoVoList;

    /**
     * 所有节点数量
     */
    private Integer allCount;

    /**
     * 已完成的关键节点数量
     */
    private Integer finishCount;

    /**
     * 所有未完成的节点数量
     */
    private Integer unFinishCount;

    public OrderInfoByInpatNoVo(){
    }


    public Integer getAllCount() {
        return allCount;
    }

    public void setAllCount(Integer allCount) {
        this.allCount = allCount;
    }

    public Integer getFinishCount() {
        return finishCount;
    }

    public void setFinishCount(Integer finishCount) {
        this.finishCount = finishCount;
    }

    public Integer getStatusId() {
        return statusId;
    }

    public void setStatusId(Integer statusId) {
        this.statusId = statusId;
    }

    public String getInpatNum() {
        return inpatNum;
    }

    public void setInpatNum(String inpatNum) {
        this.inpatNum = inpatNum;
    }

    public String getAdministration() {
        return administration;
    }

    public void setAdministration(String administration) {
        this.administration = administration;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPatName() {
        return patName;
    }

    public void setPatName(String patName) {
        this.patName = patName;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(String gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getTmpStatus() {
        return tmpStatus;
    }

    public void setTmpStatus(String tmpStatus) {
        this.tmpStatus = tmpStatus;
    }

    public String getOrdersItem() {
        return ordersItem;
    }

    public void setOrdersItem(String ordersItem) {
        this.ordersItem = ordersItem;
    }

    public Double getItemDosage() {
        return itemDosage;
    }

    public void setItemDosage(Double itemDosage) {
        this.itemDosage = itemDosage;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getOrdersRemark() {
        return ordersRemark;
    }

    public void setOrdersRemark(String ordersRemark) {
        this.ordersRemark = ordersRemark;
    }

    public Timestamp getPlanBeginDatetime() {
        return planBeginDatetime;
    }

    public void setPlanBeginDatetime(Timestamp planBeginDatetime) {
        this.planBeginDatetime = planBeginDatetime;
    }

    public Timestamp getPlanEndDatetime() {
        return planEndDatetime;
    }

    public void setPlanEndDatetime(Timestamp planEndDatetime) {
        this.planEndDatetime = planEndDatetime;
    }

    public String getStopDatetime() {
        return stopDatetime;
    }

    public void setStopDatetime(String stopDatetime) {
        this.stopDatetime = stopDatetime;
    }

    public String getStopUserName() {
        return stopUserName;
    }

    public void setStopUserName(String stopUserName) {
        this.stopUserName = stopUserName;
    }

    public String getExecUserName() {
        if(StringUtils.isBlank(execUserName)){
            return  StringUtils.EMPTY;
        }
        return execUserName;
    }

    public void setExecUserName(String execUserName) {
        this.execUserName = execUserName;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public List<OrderInfoByInpatNoVo> getOrderInfoByInpatNoVoList() {
        return orderInfoByInpatNoVoList;
    }

    public void setOrderInfoByInpatNoVoList(List<OrderInfoByInpatNoVo> orderInfoByInpatNoVoList) {
        this.orderInfoByInpatNoVoList = orderInfoByInpatNoVoList;
    }

    public String getInpatorderdataId() {
        return inpatorderdataId;
    }

    public void setInpatorderdataId(String inpatorderdataId) {
        this.inpatorderdataId = inpatorderdataId;
    }

    public String getFreqName() {
        if(Objects.isNull(freqName)){
            return StringUtils.EMPTY;
        }
        return freqName;
    }

    public void setFreqName(String freqName) {
        this.freqName = freqName;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getExecDatetime() {
        return execDatetime;
    }

    public void setExecDatetime(String execDatetime) {
        this.execDatetime = execDatetime;
    }

    public Integer getOrderStatusValue() {
        return orderStatusValue;
    }

    public void setOrderStatusValue(Integer orderStatusValue) {
        this.orderStatusValue = orderStatusValue;
    }

    public Integer getUnFinishCount() {
        return unFinishCount;
    }

    public void setUnFinishCount(Integer unFinishCount) {
        this.unFinishCount = unFinishCount;
    }
}
